require 'rubygems'
require 'erb'
require 'ruby-debug'
require 'yaml'

module Match
	class PropsConfig
		def self.load(file_path = "config/match.yml")
			config = YAML.load(ERB.new(File.read(file_path)).result)
			results = {}
			ret_line = {}
			default_line = {}
			
			config["default"].each do |k, v|
				default_line[k] = v
			end
			
			config.each do |k, v|
				 next if k.nil? || k == "default" 
				 results[k.downcase] = default_line.merge v
			end
			results
		end
	end
end
